/*
 * TitleFrameBackend.java
 * Team QQ
 */

package com.google.code.timetrail.presenter;



import javax.swing.ImageIcon;

import com.google.code.timetrail.backend.Control;

/**
 * @author Jake Gibel
 * @version 1.0.0
	The backend that retreives and handles the information 
	being used in TitleFrameBackend
 */
public class TitleFrameBackend {

	/**
     * The current game's data
     */
    private final Control gameControl;

    /**
     * Image of the title
     */
	private final ImageIcon title;

	/**
	 * Image of background
	 */
	private final ImageIcon background;

	/**
	 * Image of star
	 */
	private final ImageIcon star;

	/**
	 * Image of the text for the Load Game button
	 */
	private final ImageIcon loadGameButtonText;

	/**
	 * Image of the text for the Load Game button when hovered over
	 */
	private final ImageIcon loadGameButtonTextHover;

	/**
	 * Image of the text for the New Game button
	 */
	private final ImageIcon newGameButtonText;

	/**
	 * Image of the text for the New Game button when hovered over
	 */
	private final ImageIcon newGameButtonTextHover;
	
	/**
	 * Constructor for TitleFrameBackend.
	 * @param gameControl the instance of the game running
	 */
	public TitleFrameBackend(Control gameControl) {
		this.gameControl = gameControl;
		title = new ImageIcon("assets/images/time_trial_title.png",
		        "This is the game's title art.");
		background = new ImageIcon("assets/images/space_background.jpg",
		        "This is the title page's background");
		star = new ImageIcon("assets/images/whitewonderstar.gif",
		        "This is a star used to make the page pretty");
		loadGameButtonText = new ImageIcon("assets/images/load_game_button.png",
		        "This is the Load Game button's image");
		newGameButtonText = new ImageIcon("assets/images/new_game_button.png",
		        "This is the New Game button's image");
		loadGameButtonTextHover = 
		        new ImageIcon("assets/images/load_game_button_hover.png",
		        "This is the Load Game button's image");
		newGameButtonTextHover = new ImageIcon("assets/images/new_game_button_hover.png",
		        "This is the New Game button's image");
	}
	
	/**
	 * 
	 * @return the title image
	 */
	public ImageIcon getTitle() {
		return title;
	}

	/**
	 * @return an ImageIcon of the background image
	 */
	public ImageIcon getBackground() {
		return background;
	}

	/**
	 * @return an ImageIcon of the star image
	 */
	public ImageIcon getStar() {
		return star;
	}
	
	/**
	 * @return and ImageIcon of the load game text
	 */
	public ImageIcon getLoadGameButtonText() {
		return loadGameButtonText;
	}

	/**
	 * @return an ImageIcon of the load game text when hovered
	 */
	public ImageIcon getLoadGameButtonTextHover() {
		return loadGameButtonTextHover;
	}

	/**
	 * @return an ImageIcon of the new game button text
	 */
	public ImageIcon getNewGameButtonText() {
		return newGameButtonText;
	}

	/**
	 * @return an ImageIcon of the new game button hovered text
	 */
	public ImageIcon getNewGameButtonTextHover() {
		return newGameButtonTextHover;
	}

	/**
	 * @return a String representation of the class
	 */
	public String toString(){
	    return "Title Frame Backend";
	}
}
